<?#//v.3.1.1
#///////////////////////////////////////////////////////
#//  COPYRIGHT 2004 Phpauction.org ALL RIGHTS RESERVED//
#///////////////////////////////////////////////////////

require('../includes/config.inc.php');
include "loggedin.inc.php";

include $include_path.'status.inc.php';

#//
$ERR = "&nbsp;";

if(is_array($_POST[delete]) && phpa_securepost($_POST))
{
	while(list($k,$v) = each($_POST[delete]))
	{
		@mysql_query("delete from PHPAUCTIONXL_adminusers where id=$k");
	}
}

#//
$query = "SELECT * FROM PHPAUCTIONXL_adminusers order by username";
$res = @mysql_query($query);
if(!$res)
{
	print "Error: $query<BR>".mysql_error();
	exit;
}

?>
<HTML>
<HEAD>
<link rel='stylesheet' type='text/css' href='style.css' />
<link href="css/main.css" rel="stylesheet" type="text/css">
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" link="#0066FF" vlink="#666666" alink="#000066" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="base">
  <tr> 
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0" class="titulo">
        <tr> 
          <td class="icono"><img src="images/users_icon2.gif" width="17" height="23" ></td>
          <td  class="breadcrumbs"><p><span><?=$MSG_25_0010?></span>&nbsp;&gt;&gt;&nbsp;<?=$MSG_525?></p></td>
        </tr>
      </table></td>
  </tr>
  <tr>
    <td align="center" valign="middle">&nbsp;</td>
  </tr>
    <tr> 
    <td align="center" valign="middle">
<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0 BGCOLOR="#FFFFFF">
<TR>
<TD>
<CENTER>
<BR>
<FORM NAME=conf ACTION=<?=basename($_SERVER['PHP_SELF'])?> METHOD=POST>
<TABLE WIDTH="95%" BORDER="0" CELLSPACING="0" CELLPADDING="0"ALIGN="CENTER">
<TR>
<TD ALIGN=CENTER class=title>
<p><? print $MSG_525; ?></p>
</TD>
</TR>
<TR>
<TD>
<TABLE WIDTH=100% ALIGN="CENTER" CELLPADDING=0 cellspacing="0" BGCOLOR="#FFFFFF">
<TR>
<TD COLSPAN="2"><A HREF="./increments.php">
</A>
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR BGCOLOR="#EEEEEE">
		<TD COLSPAN="5" ALIGN=CENTER><p><A HREF=newadminuser.php><?=$MSG_568?></A></p></TD>
</TR>
<TR BGCOLOR="#808080">
		<TD WIDTH="30%" class="white">
				<CENTER>
					<B>
					<? print $MSG_557; ?>
					</B>
				</CENTER>
		</TD>
		<TD WIDTH="16%" class="white">
				<CENTER>
					<B>
					<? print $MSG_558; ?>
					</B>
				</CENTER>
		</TD>
		<TD WIDTH="19%" class="white">
				<CENTER>
					<B>
					<? print $MSG_559; ?>
					</B>
				</CENTER>
		</TD>
		<TD WIDTH="12%" class="white">
				<CENTER>
					<B>
					<? print $MSG_560; ?>
					</B>
				</CENTER>
		</TD>
		<TD WIDTH="23%">
				<CENTER>
					<B>
					<INPUT TYPE="submit" NAME="Submit" VALUE="<?=$MSG_561?>" class="action">
					</B>
				</CENTER>
		</TD>
</TR>
<?
while($USER = mysql_fetch_array($res))
{
	$CREATED = substr($USER[created],4,2)."/".
	substr($USER[created],6,2)."/".
	substr($USER[created],0,4);
	if($USER[lastlogin] == 0)
	{
		$LASTLOGIN = $MSG_570;
	}
	else
	{
		$LASTLOGIN = substr($USER[lastlogin],4,2)."/".
		substr($USER[lastlogin],6,2)."/".
		substr($USER[lastlogin],0,4)." ".
		substr($USER[lastlogin],8,2).":".
		substr($USER[lastlogin],10,2).":".
		substr($USER[lastlogin],12,2);
	}
	
?>
<TR BGCOLOR="#EEEEEE">
		<TD WIDTH="30%" ALIGN=CENTER>
				<A HREF=editadminuser.php?id=<?=$USER[id]?>>
				<?=$USER[username]?>
				</A></TD>
		<TD WIDTH="16%" ALIGN=CENTER>
				<?=$CREATED?>
				</TD>
		<TD WIDTH="19%" ALIGN=CENTER>
				<?=$LASTLOGIN?>
				</TD>
		<TD WIDTH="12%" ALIGN=CENTER>
				<?=$STATUS[$USER[status]]?>
				</TD>
		<TD WIDTH="23%">
				<CENTER>
				<INPUT TYPE="checkbox" NAME="delete[<?=$USER[id]?>]" VALUE="<?=$USER[id]?>">
				</CENTER>
		</TD>
</TR>
<?
}
?>
</TABLE>
<A HREF="./increments.php" CLASS="links">
</A></TD>
</TR>
<TR>
<TD WIDTH=169>
<INPUT TYPE="hidden" NAME="action" VALUE="update" /> <INPUT TYPE="hidden" NAME="security" VALUE="<?php echo $_SESSION['security'];?>" />
</TD>
<TD WIDTH="365">&nbsp; </TD>
</TR>
<TR>
<TD WIDTH=169></TD>
<TD WIDTH="365"> </TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</FORM>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>